home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Reference Guide / C-C++ Interactive Reference Guide.iso / c_ref / csource5 / 332_01 / makefile.68 < prev    next >
Makefile  |  1990-01-07  |  12KB  |  426 lines

  1. #################################################################
  2. #               PCCURSES                #
  3. #                                #
  4. # Makefile for the 68K version of the PCCURSES runtime        #
  5. # library (CURSES.LIB) for the Paragon 'C' compiler and        #
  6. # assembler.                            #
  7. #################################################################
  8. # 1.4:    Release:                    900114    #
  9. #################################################################
  10.  
  11. INCDIR=\mcc68k
  12. LIBDIR=\m68k\lib
  13. WRKDIR=wrk
  14. CC=mcc68k
  15. CFLAGS= /opt=all /DEFINE=BUG68K=1
  16. ASM=asm68k
  17. AFLAGS= /E
  18. LINK=lod68k
  19. LFLAGS= /T /X
  20. LIB=lib68k
  21.  
  22.  
  23. HEADERS=    $(INCDIR)        $(INCDIR)\curses.h    \
  24.         $(INCDIR)\curspriv.h    $(INCDIR)\stdio.h    \
  25.         $(INCDIR)\conio.h
  26.  
  27. OBJS=        $(WRKDIR)                    \
  28.         $(WRKDIR)\attrib.obj    $(WRKDIR)\beep.obj    \
  29.         $(WRKDIR)\border.obj    $(WRKDIR)\boxes.obj    \
  30.         $(WRKDIR)\charadd.obj    $(WRKDIR)\chardel.obj    \
  31.         $(WRKDIR)\charget.obj    $(WRKDIR)\charins.obj    \
  32.         $(WRKDIR)\charpick.obj    $(WRKDIR)\clrtobot.obj    \
  33.         $(WRKDIR)\clrtoeol.obj    $(WRKDIR)\endwin.obj    \
  34.         $(WRKDIR)\initscr.obj    $(WRKDIR)\linedel.obj    \
  35.         $(WRKDIR)\lineins.obj    $(WRKDIR)\longname.obj    \
  36.         $(WRKDIR)\move.obj    $(WRKDIR)\mvcursor.obj    \
  37.         $(WRKDIR)\newwin.obj    $(WRKDIR)\options.obj    \
  38.         $(WRKDIR)\overlay.obj    $(WRKDIR)\prntscan.obj    \
  39.         $(WRKDIR)\refresh.obj    $(WRKDIR)\scrreg.obj    \
  40.         $(WRKDIR)\setmode.obj    $(WRKDIR)\setterm.obj    \
  41.         $(WRKDIR)\stradd.obj    $(WRKDIR)\strget.obj    \
  42.         $(WRKDIR)\tabsize.obj    $(WRKDIR)\termmisc.obj    \
  43.         $(WRKDIR)\unctrl.obj    $(WRKDIR)\update.obj    \
  44.         $(WRKDIR)\winclear.obj    $(WRKDIR)\windel.obj    \
  45.         $(WRKDIR)\winerase.obj    $(WRKDIR)\winmove.obj    \
  46.         $(WRKDIR)\winscrol.obj    $(WRKDIR)\wintouch.obj    \
  47.         $(WRKDIR)\curses68.obj
  48.  
  49. #################################################################
  50. # Default targets.                        #
  51. #################################################################
  52.  
  53. default:    $(HEADERS)    $(LIBDIR)\curses.lib
  54.  
  55. #################################################################
  56. # Directory creation and include file installation        #
  57. #################################################################
  58.  
  59. $(LIBDIR):
  60.     mkdir $(LIBDIR)
  61.  
  62. $(WRKDIR):
  63.     mkdir $(WRKDIR)
  64.  
  65. $(INCDIR):
  66.     mkdir $(INCDIR)
  67.  
  68. $(INCDIR)\curses.h: curses.h
  69.     attrib -r $(INCDIR)\curses.h
  70.     copy curses.h $(INCDIR)\curses.h
  71.     attrib +r $(INCDIR)\curses.h
  72.  
  73. $(INCDIR)\curspriv.h: curspriv.h
  74.     attrib -r $(INCDIR)\curspriv.h
  75.     copy curspriv.h $(INCDIR)
  76.     attrib +r $(INCDIR)\curspriv.h
  77.  
  78. $(INCDIR)\stdio.h: ..\rts68\stdio.h
  79.     attrib -r $(INCDIR)\stdio.h
  80.     copy ..\rts68\stdio.h $(INCDIR)
  81.     attrib +r $(INCDIR)\stdio.h
  82.  
  83. $(INCDIR)\conio.h: ..\rts68\conio.h
  84.     attrib -r $(INCDIR)\conio.h
  85.     copy ..\rts68\conio.h $(INCDIR)
  86.     attrib +r $(INCDIR)\conio.h
  87.  
  88. #################################################################
  89. # Resultant linkable files generation:                #
  90. #################################################################
  91.  
  92. $(LIBDIR)\curses.lib:    $(LIBDIR) $(OBJS)
  93.     cd $(WRKDIR)
  94.     command -c $(LIB) <..\curses68.cmd
  95.     copy curses.lib $(LIBDIR)
  96.     cd ..
  97.  
  98. #################################################################
  99. # Object file generation:                    #
  100. #################################################################
  101.  
  102. $(WRKDIR)\attrib.obj:    attrib.c $(HEADERS)
  103.     cd $(WRKDIR)
  104.     command -c break on
  105.     $(CC) $(CFLAGS) /output=attrib.asm ..\attrib.c
  106.     command -c break on
  107.     $(ASM) attrib.asm,attrib.obj,nul $(AFLAGS)
  108.     cd ..
  109.  
  110. $(WRKDIR)\beep.obj:    beep.c $(HEADERS)
  111.     cd $(WRKDIR)
  112.     command -c break on
  113.     $(CC) $(CFLAGS) /output=beep.asm ..\beep.c
  114.     command -c break on
  115.     $(ASM) beep.asm,beep.obj,nul $(AFLAGS)
  116.     cd ..
  117.  
  118. $(WRKDIR)\border.obj:    border.c $(HEADERS)
  119.     cd $(WRKDIR)
  120.     command -c break on
  121.     $(CC) $(CFLAGS) /output=border.asm ..\border.c
  122.     command -c break on
  123.     $(ASM) border.asm,border.obj,nul $(AFLAGS)
  124.     cd ..
  125.  
  126. $(WRKDIR)\boxes.obj:    boxes.c $(HEADERS)
  127.     cd $(WRKDIR)
  128.     command -c break on
  129.     $(CC) $(CFLAGS) /output=boxes.asm ..\boxes.c
  130.     command -c break on
  131.     $(ASM) boxes.asm,boxes.obj,nul $(AFLAGS)
  132.     cd ..
  133.  
  134. $(WRKDIR)\charadd.obj:    charadd.c $(HEADERS)
  135.     cd $(WRKDIR)
  136.     command -c break on
  137.     $(CC) $(CFLAGS) /output=charadd.asm ..\charadd.c
  138.     command -c break on
  139.     $(ASM) charadd.asm,charadd.obj,nul $(AFLAGS)
  140.     cd ..
  141.  
  142. $(WRKDIR)\chardel.obj:    chardel.c $(HEADERS)
  143.     cd $(WRKDIR)
  144.     $(CC) $(CFLAGS) /output=chardel.asm ..\chardel.c
  145.     command -c break on
  146.     $(ASM) chardel.asm,chardel.obj,nul $(AFLAGS)
  147.     command -c break on
  148.     cd ..
  149.  
  150. $(WRKDIR)\charget.obj:    charget.c $(HEADERS)
  151.     cd $(WRKDIR)
  152.     command -c break on
  153.     $(CC) $(CFLAGS) /output=charget.asm ..\charget.c
  154.     command -c break on
  155.     $(ASM) charget.asm,charget.obj,nul $(AFLAGS)
  156.     cd ..
  157.  
  158. $(WRKDIR)\charins.obj:    charins.c $(HEADERS)
  159.     cd $(WRKDIR)
  160.     command -c break on
  161.     $(CC) $(CFLAGS) /output=charins.asm ..\charins.c
  162.     command -c break on
  163.     $(ASM) charins.asm,charins.obj,nul $(AFLAGS)
  164.     cd ..
  165.  
  166. $(WRKDIR)\charpick.obj:    charpick.c $(HEADERS)
  167.     cd $(WRKDIR)
  168.     command -c break on
  169.     $(CC) $(CFLAGS) /output=charpick.asm ..\charpick.c
  170.     command -c break on
  171.     $(ASM) charpick.asm,charpick.obj,nul $(AFLAGS)
  172.     cd ..
  173.  
  174. $(WRKDIR)\clrtobot.obj:    clrtobot.c $(HEADERS)
  175.     cd $(WRKDIR)
  176.     command -c break on
  177.     $(CC) $(CFLAGS) /output=clrtobot.asm ..\clrtobot.c
  178.     command -c break on
  179.     $(ASM) clrtobot.asm,clrtobot.obj,nul $(AFLAGS)
  180.     cd ..
  181.  
  182. $(WRKDIR)\clrtoeol.obj:    clrtoeol.c $(HEADERS)
  183.     cd $(WRKDIR)
  184.     command -c break on
  185.     $(CC) $(CFLAGS) /output=clrtoeol.asm ..\clrtoeol.c
  186.     command -c break on
  187.     $(ASM) clrtoeol.asm,clrtoeol.obj,nul $(AFLAGS)
  188.     cd ..
  189.  
  190. $(WRKDIR)\endwin.obj:    endwin.c $(HEADERS)
  191.     cd $(WRKDIR)
  192.     command -c break on
  193.     $(CC) $(CFLAGS) /output=endwin.asm ..\endwin.c
  194.     command -c break on
  195.     $(ASM) endwin.asm,endwin.obj,nul $(AFLAGS)
  196.     cd ..
  197.  
  198. $(WRKDIR)\initscr.obj:    initscr.c $(HEADERS)
  199.     cd $(WRKDIR)
  200.     command -c break on
  201.     $(CC) $(CFLAGS) /output=initscr.asm ..\initscr.c
  202.     command -c break on
  203.     $(ASM) initscr.asm,initscr.obj,nul $(AFLAGS)
  204.     cd ..
  205.  
  206. $(WRKDIR)\linedel.obj:    linedel.c $(HEADERS)
  207.     cd $(WRKDIR)
  208.     command -c break on
  209.     $(CC) $(CFLAGS) /output=linedel.asm ..\linedel.c
  210.     command -c break on
  211.     $(ASM) linedel.asm,linedel.obj,nul $(AFLAGS)
  212.     cd ..
  213.  
  214. $(WRKDIR)\lineins.obj:    lineins.c $(HEADERS)
  215.     cd $(WRKDIR)
  216.     command -c break on
  217.     $(CC) $(CFLAGS) /output=lineins.asm ..\lineins.c
  218.     command -c break on
  219.     $(ASM) lineins.asm,lineins.obj,nul $(AFLAGS)
  220.     cd ..
  221.  
  222. $(WRKDIR)\longname.obj:    longname.c $(HEADERS)
  223.     cd $(WRKDIR)
  224.     command -c break on
  225.     $(CC) $(CFLAGS) /output=longname.asm ..\longname.c
  226.     command -c break on
  227.     $(ASM) longname.asm,longname.obj,nul $(AFLAGS)
  228.     cd ..
  229.  
  230. $(WRKDIR)\move.obj:    move.c $(HEADERS)
  231.     cd $(WRKDIR)
  232.     command -c break on
  233.     $(CC) $(CFLAGS) /output=move.asm ..\move.c
  234.     command -c break on
  235.     $(ASM) move.asm,move.obj,nul $(AFLAGS)
  236.     cd ..
  237.  
  238. $(WRKDIR)\mvcursor.obj:    mvcursor.c $(HEADERS)
  239.     cd $(WRKDIR)
  240.     command -c break on
  241.     $(CC) $(CFLAGS) /output=mvcursor.asm ..\mvcursor.c
  242.     command -c break on
  243.     $(ASM) mvcursor.asm,mvcursor.obj,nul $(AFLAGS)
  244.     cd ..
  245.  
  246. $(WRKDIR)\newwin.obj:    newwin.c $(HEADERS)
  247.     cd $(WRKDIR)
  248.     command -c break on
  249.     $(CC) $(CFLAGS) /output=newwin.asm ..\newwin.c
  250.     command -c break on
  251.     $(ASM) newwin.asm,newwin.obj,nul $(AFLAGS)
  252.     cd ..
  253.  
  254. $(WRKDIR)\options.obj:    options.c $(HEADERS)
  255.     cd $(WRKDIR)
  256.     command -c break on
  257.     $(CC) $(CFLAGS) /output=options.asm ..\options.c
  258.     command -c break on
  259.     $(ASM) options.asm,options.obj,nul $(AFLAGS)
  260.     cd ..
  261.  
  262. $(WRKDIR)\overlay.obj:    overlay.c $(HEADERS)
  263.     cd $(WRKDIR)
  264.     command -c break on
  265.     $(CC) $(CFLAGS) /output=overlay.asm ..\overlay.c
  266.     command -c break on
  267.     $(ASM) overlay.asm,overlay.obj,nul $(AFLAGS)
  268.     cd ..
  269.  
  270. $(WRKDIR)\prntscan.obj:    prntscan.c $(HEADERS)
  271.     cd $(WRKDIR)
  272.     command -c break on
  273.     $(CC) $(CFLAGS) /output=prntscan.asm ..\prntscan.c
  274.     command -c break on
  275.     $(ASM) prntscan.asm,prntscan.obj,nul $(AFLAGS)
  276.     cd ..
  277.  
  278. $(WRKDIR)\refresh.obj:    refresh.c $(HEADERS)
  279.     cd $(WRKDIR)
  280.     command -c break on
  281.     $(CC) $(CFLAGS) /output=refresh.asm ..\refresh.c
  282.     command -c break on
  283.     $(ASM) refresh.asm,refresh.obj,nul $(AFLAGS)
  284.     cd ..
  285.  
  286. $(WRKDIR)\scrreg.obj:    scrreg.c $(HEADERS)
  287.     cd $(WRKDIR)
  288.     command -c break on
  289.     $(CC) $(CFLAGS) /output=scrreg.asm ..\scrreg.c
  290.     command -c break on
  291.     $(ASM) scrreg.asm,scrreg.obj,nul $(AFLAGS)
  292.     cd ..
  293.  
  294. $(WRKDIR)\setmode.obj:    setmode.c $(HEADERS)
  295.     cd $(WRKDIR)
  296.     command -c break on
  297.     $(CC) $(CFLAGS) /output=setmode.asm ..\setmode.c
  298.     command -c break on
  299.     $(ASM) setmode.asm,setmode.obj,nul $(AFLAGS)
  300.     cd ..
  301.  
  302. $(WRKDIR)\setterm.obj:    setterm.c $(HEADERS)
  303.     cd $(WRKDIR)
  304.     command -c break on
  305.     $(CC) $(CFLAGS) /output=setterm.asm ..\setterm.c
  306.     command -c break on
  307.     $(ASM) setterm.asm,setterm.obj,nul $(AFLAGS)
  308.     cd ..
  309.  
  310. $(WRKDIR)\stradd.obj:    stradd.c $(HEADERS)
  311.     cd $(WRKDIR)
  312.     command -c break on
  313.     $(CC) $(CFLAGS) /output=stradd.asm ..\stradd.c
  314.     command -c break on
  315.     $(ASM) stradd.asm,stradd.obj,nul $(AFLAGS)
  316.     cd ..
  317.  
  318. $(WRKDIR)\strget.obj:    strget.c $(HEADERS)
  319.     cd $(WRKDIR)
  320.     command -c break on
  321.     $(CC) $(CFLAGS) /output=strget.asm ..\strget.c
  322.     command -c break on
  323.     $(ASM) strget.asm,strget.obj,nul $(AFLAGS)
  324.     cd ..
  325.  
  326. $(WRKDIR)\tabsize.obj:    tabsize.c $(HEADERS)
  327.     cd $(WRKDIR)
  328.     command -c break on
  329.     $(CC) $(CFLAGS) /output=tabsize.asm ..\tabsize.c
  330.     command -c break on
  331.     $(ASM) tabsize.asm,tabsize.obj,nul $(AFLAGS)
  332.     cd ..
  333.  
  334. $(WRKDIR)\termmisc.obj:    termmisc.c $(HEADERS)
  335.     cd $(WRKDIR)
  336.     command -c break on
  337.     $(CC) $(CFLAGS) /output=termmisc.asm ..\termmisc.c
  338.     command -c break on
  339.     $(ASM) termmisc.asm,termmisc.obj,nul $(AFLAGS)
  340.     cd ..
  341.  
  342. $(WRKDIR)\unctrl.obj:    unctrl.c $(HEADERS)
  343.     cd $(WRKDIR)
  344.     command -c break on
  345.     $(CC) $(CFLAGS) /output=unctrl.asm ..\unctrl.c
  346.     command -c break on
  347.     $(ASM) unctrl.asm,unctrl.obj,nul $(AFLAGS)
  348.     cd ..
  349.  
  350. $(WRKDIR)\update.obj:    update.c $(HEADERS)
  351.     cd $(WRKDIR)
  352.     command -c break on
  353.     $(CC) $(CFLAGS) /output=update.asm ..\update.c
  354.     command -c break on
  355.     $(ASM) update.asm,update.obj,nul $(AFLAGS)
  356.     cd ..
  357.  
  358. $(WRKDIR)\winclear.obj:    winclear.c $(HEADERS)
  359.     cd $(WRKDIR)
  360.     command -c break on
  361.     $(CC) $(CFLAGS) /output=winclear.asm ..\winclear.c
  362.     command -c break on
  363.     $(ASM) winclear.asm,winclear.obj,nul $(AFLAGS)
  364.     cd ..
  365.  
  366. $(WRKDIR)\windel.obj:    windel.c $(HEADERS)
  367.     cd $(WRKDIR)
  368.     command -c break on
  369.     $(CC) $(CFLAGS) /output=windel.asm ..\windel.c
  370.     command -c break on
  371.     $(ASM) windel.asm,windel.obj,nul $(AFLAGS)
  372.     cd ..
  373.  
  374. $(WRKDIR)\winerase.obj:    winerase.c $(HEADERS)
  375.     cd $(WRKDIR)
  376.     command -c break on
  377.     $(CC) $(CFLAGS) /output=winerase.asm ..\winerase.c
  378.     command -c break on
  379.     $(ASM) winerase.asm,winerase.obj,nul $(AFLAGS)
  380.     cd ..
  381.  
  382. $(WRKDIR)\winmove.obj:    winmove.c $(HEADERS)
  383.     cd $(WRKDIR)
  384.     command -c break on
  385.     $(CC) $(CFLAGS) /output=winmove.asm ..\winmove.c
  386.     command -c break on
  387.     $(ASM) winmove.asm,winmove.obj,nul $(AFLAGS)
  388.     cd ..
  389.  
  390. $(WRKDIR)\winscrol.obj:    winscrol.c $(HEADERS)
  391.     cd $(WRKDIR)
  392.     command -c break on
  393.     $(CC) $(CFLAGS) /output=winscrol.asm ..\winscrol.c
  394.     command -c break on
  395.     $(ASM) winscrol.asm,winscrol.obj,nul $(AFLAGS)
  396.     cd ..
  397.  
  398. $(WRKDIR)\wintouch.obj:    wintouch.c $(HEADERS)
  399.     cd $(WRKDIR)
  400.     command -c break on
  401.     $(CC) $(CFLAGS) /output=wintouch.asm ..\wintouch.c
  402.     command -c break on
  403.     $(ASM) wintouch.asm,wintouch.obj,nul $(AFLAGS)
  404.     cd ..
  405.  
  406. $(WRKDIR)\curses68.obj:    curses68.c $(HEADERS)
  407.     cd $(WRKDIR)
  408.     command -c break on
  409.     $(CC) $(CFLAGS) /output=curses68.asm ..\curses68.c
  410.     command -c break on
  411.     $(ASM) curses68.asm,curses68.obj,nul $(AFLAGS)
  412.     cd ..
  413.  
  414. #################################################################
  415. # Maintenance chores                        #
  416. #################################################################
  417.  
  418. clean:
  419.     rm -il $(WRKDIR)\*.*
  420.     rmdir  $(WRKDIR)
  421.  
  422. shar:
  423.     command -c makekit -x *.* >manifest
  424.     makekit -m *.*
  425.     del manifest.*
  426.